package coder520.mq.controller;

import coder520.mq.controller.service.QueueSend;
import coder520.mq.controller.service.TopicSend;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Administrator on 2017/7/29.
 */

@Controller
@RequestMapping("mq")
public class MqTest {

    @Autowired
    private QueueSend queueSend;

    @Autowired
    private TopicSend topicSend;

    @RequestMapping("/test1")
    @ResponseBody
    public String test1(){

        queueSend.send("coder520.queue","queueSend：coder520.queue");
        topicSend.send("coder520.topic","topicSend：coder520.topic");

        return "succ";
    }


}
